 <?php
echo $html->css ( 'tab' );
echo $html->css ( 'jquery-validate/css/screen' );
echo $html->css('start/jquery-ui-1.8.2.custom');
echo $javascript->link('jquery-ui-1.8.2.custom.min');
?> 
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );

		 
		$(".startDate").val("<?php echo $data['Legalholiday']['startDate'];?>");
		$(".endDate").val("<?php echo $data['Legalholiday']['endDate'];?>");
	});
</script>


<script type="text/javascript">
//Form验证
 $(document).ready(function() {
 	 $.validator.setDefaults({       
 		 submitHandler: function(form) {    
 		  form.submit();    
 		}       
 	});  
				$("#SystemconfigsUpdatelegalholidayForm").validate({
					rules: {
						name:{
							required: true,alowsome: true,stringMinLength:0,stringMaxLength:20
						},
						startDate:{
							required: true, dateISO:true
						},
						endDate:{
							required: true, dateISO:true, endDate:$('.startDate').val()
						}
					},
					messages: {
						name:{
						required:  "请输入假期名称",stringMinLength:"假期名称长度必须大于0个字符",stringMinLength:"假期名称长度必须小于20个字符"
							
						}
					},
					//设置验证触发事件 
					focusInvalid: false, 
					onkeyup: false, 
					//设置错误信息提示DOM  
					errorPlacement: function(error, element) { 
					error.appendTo( element.parent()); 
					}
		 		}); 
 });
</script>
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Systemconfigs');//一级目录
										   echo '>';echo __('Personal Office');//二级目录
										   echo '>';echo __('legalholidays');//三级级目录（可选）
										   echo '>';?>
									<?php echo $html->tag('span', __('Edit',true).__('legalholidays',true));//当前操作地用span加粗?> 
	</tr>
</table>
</div>
<div class="tabflex">
  <?php echo $form->create('Systemconfigs',array('action'=>'updatelegalholiday','type'=> 'post'));?>
	<fieldset>
 		<legend><?php __('Edit').__('legalholidays');?></legend>
 		<table style="text-align:left">
 		<tr>
 		<td width="100">
		 	<span id="Label3" class="searchcharstyle"><?php __('legalholidaysname'); ?>：</span>
		 </td>
		 <td width="300">
			<?php
				echo $form->hidden('id',array('name'=>'id','default'=>$data['Legalholiday']['id']));
				echo $form->input('name',array('name'=>'name','size'=>20,'label'=>false,'default'=>$data['Legalholiday']['name']));
			?>
		</td>
		</tr>
		<tr>
		 <td width="100">
			<span class="searchcharstyle"><?php __('StartUseTime'); ?>：</span>
		</td>
		 <td>
			<span class="datepickerSpan"><input type='text' size= "20" class="startDate" name="startDate" value="<?php echo $data['Legalholiday']['startDate'];?>"/></span><br>
		</td>
				</tr>
		<tr>
		 <td width="100">	
			<span class="searchcharstyle"><?php __('EndUseTime'); ?>：</span>
		</td>
		 <td>	
			<span class="datepickerSpan"><input type='text' size= "20" class="endDate" name="endDate" value="<?php echo $data['Legalholiday']['endDate'];?>"/></span>
		</td>
		</tr>
		</table>
	</fieldset>
	<?php echo $form->button('返回',array('type'=>'button','class'=>'btn2','onclick'=>'history.back(-1)'));?>  <!-- 返回上一级-->
	<?php echo $form->button('确定',array('type'=>'submit','class'=>'btn2'))?>
	<?php echo $form->button('重置',array('type'=>'reset','class'=>'btn2'))?>
	<?php echo $form->end();?>
</div>